﻿<%@ Page Title="UltimateTestPage" Language="C#" MasterPageFile="~/MasterPage.master"
   AutoEventWireup="true" CodeFile="UltimateTestPage.aspx.cs" Inherits="UltimateTestPage" %>

<%@ Register Src="~/Authors.ascx" TagName="AuthorsPanel" TagPrefix="nmr" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
   TagPrefix="act" %>
<%-- Custom made page for screwturn wiki --%>
<asp:Content ID="Content1" ContentPlaceHolderID="CphMaster" runat="Server">
   <asp:ScriptManager ID="ScriptManager1" runat="server">
   </asp:ScriptManager>
   <asp:Panel ID="Panel1" runat="server" Style="margin: 10px" DefaultButton="butSearch">
      <asp:Button runat="server" Text="Add" Width="50px" />
      <asp:Label runat="server" Style="position: absolute; right: 10px">
         <asp:TextBox ID="tbSearch" runat="server" Columns="60"></asp:TextBox>
         <asp:Button ID="butSearch" runat="server" Text="Search" Style="margin-left: 5px" />
      </asp:Label>
   </asp:Panel>
   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
      <ContentTemplate>
         <asp:GridView ID="NMRExperimentsTable" runat="server" AllowPaging="True"
            AllowSorting="True" AutoGenerateColumns="False" PageSize="2" BackColor="White"
            BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3"
            GridLines="Horizontal" Width="100%" EmptyDataText="There is no experiments to display."
            DataSourceID="ExperimentsTableDataSource">
            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            <Columns>
               <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" InsertVisible="False">
                  <ItemStyle Width="50px" VerticalAlign="Top" />
               </asp:BoundField>
               <asp:HyperLinkField HeaderText="Name" DataTextField="Name" DataNavigateUrlFields="Id"
                  DataNavigateUrlFormatString="Experiment_id_{0}.ashx" SortExpression="Name">
                  <ItemStyle Width="150px" VerticalAlign="Top" Font-Underline="True" />
               </asp:HyperLinkField>
               <asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type">
                  <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="150px" />
               </asp:BoundField>
               <asp:BoundField DataField="Dimentionality" HeaderText="Dim" SortExpression="Dimentionality">
                  <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="50px" />
               </asp:BoundField>
               <asp:BoundField DataField="Short Description" HeaderText="Short Description"
                  SortExpression="Short Description" ReadOnly="True">
                  <ItemStyle Width="400px" VerticalAlign="Top" />
               </asp:BoundField>
               <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date"
                  ReadOnly="True" DataFormatString="{0:d}">
                  <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="100px" />
               </asp:BoundField>
               <asp:BoundField DataField="Authors" HeaderText="Authors" ReadOnly="True"
                  SortExpression="Authors">
                  <ItemStyle Width="250px" Wrap="True" VerticalAlign="Top" />
               </asp:BoundField>
            </Columns>
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" HorizontalAlign="Left" />
            <AlternatingRowStyle BackColor="#F7F7F7" />
         </asp:GridView>
         <asp:ObjectDataSource ID="ExperimentsTableDataSource" runat="server" SelectMethod="SELECT"
            TypeName="ExperimentsTable" OldValuesParameterFormatString="original_{0}">
            <SelectParameters>
               <asp:ControlParameter ControlID="tbSearch" PropertyName="Text" Name="SearchString" />
            </SelectParameters>
         </asp:ObjectDataSource>
      </ContentTemplate>
      <Triggers>
         <asp:AsyncPostBackTrigger ControlID="butSearch" EventName="Click" />
      </Triggers>
   </asp:UpdatePanel>
</asp:Content>
